Variables
Description
Variables offer a method to extend the functionality of FormFusion. Variables store data retrieved from different areas of FormFusion so that the results can be used across components. There are two ways that variables can be created. The first is with MapForm and the second is with CaptureForm-SQL.
MapForm creates a "string" variable when you draw a field. This variable is then usable anywhere else in the application in which variables are accepted.
You can create variables with CaptureForm-SQL and populate these variables when you write a SELECT SQL statement. The INTO clause is where multiple variables can be populated.
Pinning
The Variable Reference window is a pinnable object just like the Process Tree. It can be minimized to the left side of the screen only showing when you mouse over it; or you can click on the pin icon at the top to pin it in place so that it will continue to be visible.
Sorting
Additionally, the list of variables can be sorted by name or by owner by clicking the Variable Reference title at the top of the window and selecting the sort order you would like to use.
Format and Limitations
Variable names must be unique within a Print Parameter. The variable name must start with an alpha character (a-z or A-Z). After the first character the following characters are valid: alphanumeric (a-z, A-Z, 0-9), underscore (_), dollar-sign ($). A variable name cannot contain any spaces, instead we suggest using the underscore character in place of spaces.
Referencing
A variable is referenced using a colon followed by the variable name. For instance, if you want to reference a variable named "My_Company_Address" then you would reference it as :My_Company_Address in FormFusion wherever variable references are allowed. Variables can be used by reference in FormStamp (conditional printing), CaptureForm (within the queries), and in FormDirector.
When creating a Data Field object in FormStamp, the variables you have previously created will be present in a drop down list. You select the variable name from the list and never actually type it's name anywhere.
Reserved Variable Names
There are several reserved variable names. These names are used by the server software and can be referenced but never overwritten. The general format of global reserved variables is a name in all uppercase letters with an underscore appended. These include:
- BDMSFILENAME_ - Only populated if Imaging (BDM) executes. Contains path and filename of the temp PDF on the MAPS server. Same as IMAGINGFILENAME_
- COMMALINE_ - Used with CSV input files; contains the entire input line with commas still in place.
- DEBUG_ - Set to 0 if not running in debug mode, 1 if in debug mode (-evidebug flag)
- EMAILFILENAME_ - Only populated if the EmailDirector executes. Contains path and filename of the temp PDF on the MAP server.
- EXTRAPARAM[#]_ - EXTRAPARAM1_ through EXTRAPARAM10_ are optional parameters that can be included when calling FormFusion. They may be used for passing in items such as usernames, one-up numbers, or any other information available in the calling program when running a job. For instructions on configuring these parameters, please refer to the FormFusion Installation Guide that pertains to your ERP system.
- FILENAME_ - Contains path and filename of the temp PDF on the MAP server.
- FILENAME_UUENCODED_ - Not used in 3.0.
- IMAGINGFILENAME_ - Only populated if Imaging (BDM) executes. Contains path and filename of the temp PDF on the MAPS server. Same as BDMSFILENAME_.
- INPUTFILENAME_ - Path and filename of the original input file. Same as LISFILENAME_.
- LISFILENAME_ - Path and filename of the original input file. Same as INPUTFILENAME_.
- PRINTCOMMAND_ - When running through evilp or from the command line, contains the value of the -eviprint flag.
- PRINTFILENAME_ - The path and filename of the .prn temp print file on the MAP server.
- PROCESS_ - The process name.
- PTHRUCOMMAND_ - When running through evilp or from the command line, contains the value of the -evipassthru flag.
- SCRIPTFILENAME_ - Only populates if the ScriptDirector executes. Contains path and filename of the temp PDF on the MAP server.
- SCRIPTPATH_ - The same path as SCRIPTFILENAME, only without the filename at the end.
- SYSDATE_ - The system date at the time server started execution.
- TEMPPATH_ - Path to the temp directory on the MAP server. Exact location depends on OS version.
- Windows Server 2003: C:\Documents and Settings\[SERVICEUSER]\Local Settings\Temp\nFusion_####\
- Windows Server 2008 or higher: C:\Users\[SERVICEUSER]\AppData\Local\Temp\nFusion_####\
- USERNAME_ - The name of the MAPS user running the job. For jobs run through evilp, this is the user in the evicfg file. When doing a test print, it is the user who is currently logged in to FormFusion.
For example, to use the system date variable you would type :SYSDATE_ wherever references to variables are allowed.
Additional Topics